package com.yunsc.admin.controller.store;

import com.yunsc.common.utils.Result;
import com.yunsc.common.utils.SecurityUtil;
import com.yunsc.system.service.YunscStoreMenuService;
import com.yunsc.system.vo.StoreMenuVO;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @version: 1.0
 * @Author: adan
 * @description: 商家菜单权限信息接口
 * @date: 2024-04-21 19:06
 */
@Api(value = "商家菜单权限信息接口", tags = "商家信息接口")
@Slf4j
@RestController
@RequestMapping("menu")
public class StoreMenuController {

    @Resource
    private YunscStoreMenuService storeMenuService;

    @RequestMapping("list")
    public Result<?> queryMenuList() {
        Integer storeUserId = SecurityUtil.getCurrentStoreUserId();
        List<StoreMenuVO> menuList = storeMenuService.queryMenuList(storeUserId);
        return Result.resultList(menuList);
    }




}
